﻿IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[esf_files].[P_InsertFileReferenceWordHit]') AND type in (N'P', N'PC'))
	DROP PROCEDURE [esf_files].[P_InsertFileReferenceWordHit]
GO


CREATE PROCEDURE esf_files.P_InsertFileReferenceWordHit
	@pFileReferenceID INT
	,@pWordID INT
	,@pPageIndex INT
	,@pWordPreviousID INT = NULL

	,@pWordText VARCHAR (500)
	,@pX0 INT 
	,@pY0 INT 
	,@pX1 INT 
	,@pY1 INT 
AS
	INSERT INTO esf_files.FileReferenceWordHit
	(FileReferenceID, WordID, PageIndex, WordPreviousID, X0, Y0, X1, Y1, WordText)
	VALUES
	(@pFileReferenceID, @pWordID, @pPageIndex, @pWordPreviousID, @pX0, @pY0, @pX1, @pY1, @pWordText)